import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import {RouterModule, Routes} from '@angular/router';
import { NgZorroAntdModule, NZ_I18N, zh_CN } from 'ng-zorro-antd';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {HttpClient, HttpClientModule} from '@angular/common/http';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { registerLocaleData } from '@angular/common';
import zh from '@angular/common/locales/zh';
import {NgExToolsModule} from 'ng-ex-tools';
import {AppComponent} from './app.component';
registerLocaleData(zh);

const ROUTES: Routes = [
  {
    path: 'check-interviewer',
    loadChildren: () => import('./components/check-interviewer/check-interviewer.module').then((m) => m.CheckInterviewerModule)
  },
  {
    path: 'single-test',
    loadChildren: () => import('./components/single-test/single-test.module').then((m) => m.SingleTestModule)
  },
  {
    path: 'multiple-test',
    loadChildren: () => import('./components/mult-test/mult-test.module').then((m) => m.MultTestModule)
  },
  {path: '**', pathMatch: 'full', redirectTo: 'single-test'}
];

@NgModule({
  declarations: [
    AppComponent,
  ],
  imports: [
    BrowserModule,
    BrowserAnimationsModule,
    HttpClientModule,
    FormsModule,
    ReactiveFormsModule,
    NgZorroAntdModule,
    NgExToolsModule,
    RouterModule.forRoot(ROUTES),
  ],
  providers: [HttpClient, { provide: NZ_I18N, useValue: zh_CN }],
  bootstrap: [AppComponent]
})
export class AppModule { }
